import {Module} from '@nestjs/common';
import {LoggerService, LoggerServiceThree, LoggerServiceTwo, LoggerServiceFactory} from './logger.service'

@Module({
    providers: [
        {
            provide: "SUFFIX",
            useValue: 'apiSuffix'
        },
        LoggerService,
        {
            provide: 'LoggerServiceTwoToken',
            useClass: LoggerServiceTwo
        },
        {
            provide: 'LoggerServiceThree',
            useValue: new LoggerServiceThree('prefix')
        },
        {
            provide:'LoggerServiceFactory',
            // inject:['arg1','arg2'],
            useFactory:()=>{
                return new LoggerServiceFactory()
            }
            // useFactory:(arg1,arg2)=>{
            //     return new LoggerServiceFactory(arg1,arg2);
            // }
        }
    ],
    controllers: [],
    imports: [
    ],
    exports: [
        'SUFFIX',
        LoggerService,
        'LoggerServiceTwoToken',
        'LoggerServiceThree',
        'LoggerServiceFactory'
    ]
})
export class LoggerModule {

}
